#!/usr/bin/python
# -*- coding:utf-8 -*-

import sys
import urllib2


domains  = file(sys.argv[1]).readlines()
paths    = file(sys.argv[2]).readlines()

for domain in domains:
    for path in paths:
        url    = 'http://' + domain.replace('\n','') + path.replace('\n', '')
        try:                                           #异常检测模式
            res = urllib2.urlopen(url)                 #请求指定URL
            if res.msg == 'OK':                        #如果返回正常
                if 'phpinfo()' in res.read():          #读取网页内容，判断有无关键字
                    print '!!!!!!!found phpinfo page', url 
            else:
                print 'HTTP STATUS is not OK'
        except Exception, e:
            print e 

